<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		  <#assign base=request.contextPath  />
  <link rel="stylesheet" href="${base}/js/layui/css/layui.css" media="all">
  	<title></title>
	</head>
	<style type="text/css">
	.layui-bg-blu{
		color: #B4C2CC;
		background-color: #F0F9FF;
		border:1px solid #B4C2CC;
		background-color: white;
		border-radius:10px;
		width: 120px;
		height: 60px;
		font-size: 30px;
		
	}
	.layui-bg-blu:hover{
		color: red;
		font-size: 35px;
	}
	
      form{
           padding: 20px;
             }
      .layui-bg-blue{
           border-radius: 5px;
          }
</style>
	<body>
		<fieldset class="layui-elem-field layui-field-title">
			  <legend>月子餐单</legend>
		</fieldset>
<div  style="height:40px;"style="padding:15px;">
<div class="demoTable" style="float:right;">
	  <div class="layui-inline">
	    <input class="layui-input" name="id" id="demoReload"  autocomplete="off">
	  </div>	  	
	  <button class="layui-btn layui-bg-blue" id="btn1" data-type="reload" onclick="initHome($('#demoReload').val())">搜索</button>
</div>
</div>
		<div class="site-demo-button" id="layerDemo" style="margin: 10px;">
		    <div class="layui-btn-container" id="homes">
		      <button data-method="setTop" onclick="javascript:toHomeifream()" class="layui-btn layui-bg-blu">111</button>
		    </div>
		</div>
	
 <script src="${base}/js/layui/layui.js" charset="utf-8"></script>
  <script src="${base}/js/jquery.min.js"></script>
 <script>
	 function toHomeifream(){

	 }
  </script>
<script>

layui.use('layer', function(){
  var $ = layui.jquery,
  layer = layui.layer;
});

initHome(null);

function initHome(param){
    $.ajax({
        type:"POST",
        url:"${base}/room/findAllRoom",
		data:{"param":param},
        success : function(data){
			var htm="";
			for(var i=0;i<data.length;i++){
				htm+='<button data-method="setTop" name="'+data[i].id+'" onclick="javascript:homeData($(this).attr('+"'name'"+'))" class="layui-btn layui-bg-blu">'+data[i].name+'</button>'
			}
      $("#homes").html(  htm );
        }
    });
}

	function homeData(homeId){
        layer.open({
            type: 2 //此处以iframe举例
            ,title: '信息'
            ,area: ['730px', '400px']
            ,shade: 0
            ,offset: 'auto'
            ,content: ['${base}/foodRelation/foot_Edit?homeId='+homeId,'no']
            ,zIndex: layer.zIndex //重点1
            ,success: function (layero, index) {

            }
        });
	}
</script>
	</body>
</html>
